package com.ruoyi.flowable.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 关联流程实例和资产表
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("WORK_ORDER_ASSET_REL")
public class WorkOrderAssetRel {
    /** 主键 */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    // 流程实例相关
    private String procInsId;
    private String procDefName;
    private String procDefKey;

    // 资产相关（改为可选）
    private Long assetId;
    private String assetName;
    private String assetNumber;

    // 申请信息
    private Long startUserId;
    private String startUserName;
    private Long startDeptId;
    private String startDeptName;

    // 工单状态
    private String workOrderStatus;

    // 时间信息
    private Date createTime;
    private Date updateTime;
    private Date finishTime;
    private Date planFinishTime;

    // 业务字段
    private String applyReason;
    private String remark;

    // 新增文件链接字段
    private String fileUrl;

    // 搜索关键词（不映射到数据库）
    @TableField(exist = false)
    private String keyword;
}
